using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace WebApplication8.Data
{
  public class Course : AuditingEntityBase
  {
 
    public String XueNianXueQi { get; set; }
    [Display(Name = "课程名称")]
    public string CourseName { get; set; }
        public string TeacherId { get; set; }
    [Display(Name = "教师")]
    public Teacher Teacher { get; set; }
    [Display(Name = "门牌号")]
    public string Door { get; set; }
    [Newtonsoft.Json.JsonIgnore]
    public List<Chapter> Chapters { get; set; }
    [Newtonsoft.Json.JsonIgnore]
    public List<Lesson> Lessons { get; set; }
    public List<BanJi> BanJi { get; set; } 

    [Newtonsoft.Json.JsonIgnore]
    public List<StudentCourse> StudentCourse { get; set; }
    [Newtonsoft.Json.JsonIgnore]
    public List<CourseQuestion> CourseQuestion { get; set; }

  }


  public class Chapter : EntityBase
    { 
    [Display(Name = "课程")]
    public Course Course { get; set; }
    [Display(Name = "章节名称"), MaxLength(100)]
    public string Title { get; set; }
    [Display(Name = "章节内容"), MaxLength(9999)]
    public string Content { get; set; }
    [Newtonsoft.Json.JsonIgnore]
    public List<ChapterQuestion> ChapterQuestion { get; set; }

  }


  public enum StudentCourseState
  {
    申请中,
    接受,
    拒绝
  }
  public class StudentCourse : EntityBase
    {
        public string StudentId { get; set; }
        [Display(Name = "学生")]

    public Student Student { get; set; }
        public string CourseId { get; set; }
        [Display(Name = "课程")]

    public Course Course { get; set; }
    [Display(Name = "学分")]
    public float Score { get; set; } = 1;
    [Display(Name = "选课状态")]
    public StudentCourseState StudentCourseState { get; set; }
  }

}
